<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>理塘旅行社</title>

    <link rel="stylesheet" href="../css/register.css">
    <script src="../js/register.js"></script>
    <!--注册页-->
</head>
<body>
        <div id="loginDiv">
            <form action="/user/userRegister">
                <h1>注册</h1>
                <p>用户账号:<input name="uAccount" id="uAccount" type="text" autofocus required="required"></p>
                <p>用户姓名:<input name="uName" id="uName" type="text" autofocus required="required"></p>
                <p>用户密码:<input name="uPassword" id="uPassword" type="password" ></p>

                <p>确认密码:<input id="surePassword" type="password" onkeyup="checkPawd()" ></p>
                <p><span id="tishi"></span></p>

                <div class="sexDiv">
                    用户性别:
                    <input name="uMale" class="userSex" name="sex" value="男" type="radio">男
                    <input name="uMale" class="userSex" name="sex" value="女" type="radio">女
                    <label id="sex_trip"></label>
                </div>
               
                <p>
                    电子邮件:
                    <input name="uEmail"  id="email" type="email" required>
                    <label id="emil_trip"></label>
                </p>
                <p> 自我介绍:</p>
                <div class="introduce">
                    <textarea name="uIntroduce" cols="30" id="introduceText" required rows="10"></textarea>
                    <label id="introduce_trip"></label>
                </div>
                <p style="text-align: center;">
                    <input id="submit" type="submit" class="button" value="提交" onclick="loginT()">
                    <a href="login.html" >登录</a>
                </p>
            </form>
        </div>
</body>
</html>
<script type="text/javascript">
    function checkPawd() {
        var uPassword = document.getElementById("uPassword").value;
        var surePassword = document.getElementById("surePassword").value;

        if (uPassword == surePassword){
            document.getElementById("tishi").innerHtml="<br><font color='red'>输入一致</font>"
            document.getElementById("submit").disabled = false;
        }else {
            document.getElementById("tishi").innerHTML="<br><font color='red'>两次输入密码不一致!</font>";
            document.getElementById("submit").disabled = "true";
        }

    }
    function loginT() {
        alert("注册成功！");
    }

</script>











